package cn.modoumama.service.base;

import java.util.List;
import java.util.Map;

import cn.modoumama.page.GridDataModel;
import cn.modoumama.page.Page;

public abstract interface BaseService<T, PK>{
	
  public void init();
	
  public abstract Integer insert(T paramT);

  public abstract Integer updateById(T paramT);
  
  public abstract Integer updateNULLById(T paramT);
  
  public abstract Integer mergeById(T paramT);

  public abstract Integer removeById(PK paramPK);
  
  public abstract Integer removeByIds(PK[] paramPKs);
  
  public abstract Integer deleteByCondition(Map<String, Object> paramMap);

  public abstract T findById(PK paramPK);

  public abstract T findObjectByModel(T paramT);
  
  public abstract T findObjectByModelId(T paramT);

  public abstract List<T> findListByModel(T paramT);

  public abstract Integer countByCondition(Map<String, Object> paramMap);

  public abstract List<T> findModelsByCondition(Map<String, Object> paramMap);

  public abstract GridDataModel findGridDataModelByCondition(Page page);

  public abstract List<T> findModelsByCondition(Page page);
}

